<template>
    <map ref="map" v-bind="attrs"></map>
</template>

<script setup>
const props = defineProps({
    options: {
        type: Object
    },
    markers: {
        type: Array
    }
})
const attrs = computed(() => {
    // 入参 https://uniapp.dcloud.net.cn/component/map.html
    return {
        longitude: 26.024529,
        latitude: 119.264174,
        scale: 16,
        'min-scale': 3,
        'max-scale': 20,
        'show-location': true,
        ...props.options,
        markers: props.markers || undefined,
        'include-points': props.markers || undefined,
    }
})
</script>

<style scoped></style>
